<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 15481
  Date: 2020/10/17
  Time: 14:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <meta charset="utf-8">
    <link href="css/style.css" rel="stylesheet" type="text/css">
    <!--[if IE 6]>
    <link href="css/ie6.css" rel="stylesheet" type="text/css">
    <![endif]-->
    <!--[if IE 7]>
    <link href="css/ie7.css" rel="stylesheet" type="text/css">
    <![endif]-->
</head>
<body>
<div id="background">
    <div class="page">
        <div id="header" style="height: 100px;">
            <h1 style="font-size:50px; text-align: center; padding:40px 0; color:white;">
                亲，我们在维护中。。。
            </h1>
        </div>
        <div id="body">
            <ul class="section">
                <c:forEach items="${filenames}" var="filenames">
                    <li style="float: left; list-style: none; ">
                        <img src="${pageContext.request.contextPath}/DownloadServlet?filename=${filenames}" width="160" height="120" >
                        <h2><a href="${pageContext.request.contextPath}/DownloadServlet?filename=${filenames}" style="text-decoration:none; ">${filenames}</a></h2>
                    </li>
                </c:forEach>
            </ul>
        </div>
        <div id="footer">
            <form method="post" action="UploadServlet" onsubmit="return check()"
                  enctype="multipart/form-data" >上传文件:<input type="file" id="file" name="file" size="60" style="border:2px solid #43b8ff;"/>
                <input type="submit" value="上传">
            </form>
        </div>
        </div>
    </div>
<script>
    function check(){
        if (document.getElementById("file").value.length <=5){
            alert("请选择文件再上传哦，亲！");
            return false;
        }
        return true;
    }
</script>
</body>
</html>
